package code.main.view.table
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	/**
	 *操作特殊按钮 
	 * @author YY
	 * 
	 */
	public class PlayBtn extends Sprite
	{
		private var _view:MovieClip;
		public function PlayBtn(view:MovieClip)
		{
			super();
			_view = view;
			addChild(view);
			this.buttonMode = true;
			this.mouseChildren = false;
			this.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
			this.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
			this.addEventListener(MouseEvent.MOUSE_DOWN, downFunc);
			this.addEventListener(MouseEvent.MOUSE_UP, upFunc);
		}
		
		private function overFunc(e:Event):void {
			_view.gotoAndPlay("over");
		}
		private function outFunc(e:Event):void {
			_view.gotoAndStop("up");
		}
		private function downFunc(e:Event):void {
			_view.gotoAndStop("down");
		}
		private function upFunc(e:Event):void {
			_view.gotoAndStop("up");
		}
	}
}